package com.config.client.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author：Administrator
 * @Date：2022/7/21/0021 23:53
 * @Versiion：1.0
 */
@RestController
@RefreshScope
@Slf4j
public class ConfigClientController {

    @Value("${server.port}")
    private String serverPort;

    @Value("${config.info}")
    private String configInfo;

    @GetMapping("/configInfo")
    public String configInfo(){
        return "ServerPort : "+ serverPort + " configInfo:"+ configInfo;
    }

}
